|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/ |
Upload File : |
�
��ec @ s� d d l Z d d l Z d d l Z y d d l Z e j Z Wn d d l Z e j Z n Xd � Z d � Z d � Z d � Z e
d k r� e j d � e � e � e � e � e j � e j d � d k r� d GHq� d
e j d � GHn d S( i����Nc C sm t � } t j | d � } | j d d � | j d � | j � | j � d k ri d GHt j d � n d S( Ns
ISO-8859-1i t foot bart foobars Failed to save to StringIOi ( t str_iot libxml2t createOutputBuffert writet writeStringt closet getvaluet syst exit( t ft buf( ( sB /opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyt testSimpleBufferWrites s
c C s� d } d } t � } t j | d � } t j | � } | j | d � | j � | j � | k r� d GHd t | j � � GHd t | � GHt j d � n d S( s*
Regression test for bug #154294.
s <foo>Hello</foo>s8 <?xml version="1.0" encoding="UTF-8"?>
<foo>Hello</foo>
s UTF-8s xmlDoc.saveFileTo() call failed.s got: %ss expected: %si N(
R R R t parseDoct
saveFileTot freeDocR t reprR
R ( t inputt expectedR R
t doc( ( sB /opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/outbuf.pyt testSaveDocToBuffer s
c C s� d } d
} t j | � } x� d D]� } t � } t j | d � } | j | d | � | j � | | k r"